<template>
    <div class="index-container">
        <!-- 导航栏 -->
        <indexNavBar
                :title="$route.meta.title"
                :back="false"
                @click-left="$router.go(-1)"
        ></indexNavBar>
        <!--表单-->
        <div style="margin-top: 20px"></div>
        <d-table :option="tableCollum" :tableData="tableData"></d-table>
        <div class="noMore">没有更多内容了</div>
    </div>
</template>

<script>
import indexNavBar from '@/components/style/index-nav-bar.vue'
import dTable from '@/components/dTable/dTable.vue'
import setting from './setting'
export default {
    name: 'BindCarList',
    components: {
        indexNavBar,
        dTable
    },
    data () {
        return {
            tableData: [],
            tableCollum: setting.option,
            accountId: ''
        }
    },
    created () {
        this.accountId = this.$route.query.accountId
        console.log('accountId', this.accountId)
        this.getBindCarInfo()
    },
    mounted () {

    },
    methods: {
        /** 绑定车辆*/
        async getBindCarInfo () {
            let _ = this
            let param = {
                accountId: this.accountId
            }
            try {
                _.$U.showLoading(_)
                const res = await _.$H.get(_, _.$A.fund.accountVehicle, param)
                this.tableData = res.data.accountBindVehicleEntities
                _.$U.hideLoading(_)
            } catch (e) {
                _.$U.hideLoading(_)
            }
        }
    }
}
</script>

<style lang="less" scoped>
.noMore {
    margin: 0 auto;
    width: 84px;
    height: 40px;
    opacity: 0.4;
    font-size: 12px;
    font-family: PingFangSC, PingFangSC-Medium;
    font-weight: 500;
    text-align: right;
    color: #2d3748;
    line-height: 40px;
}
</style>
